<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Gbw() {
            this.car = '玛莎拉蒂';
            this.house = '外滩18号';
        }
        // var gtl = new Gbw();
        // console.log(gtl.car);
        // console.log(gtl.house);
        function FatherGtw (name) {
            this.name = name
        }
        FatherGtw.prototype = new Gbw(); // 为了完成一些功能，带来了一些副作用
        FatherGtw.prototype.constructor = Father; // 纠正
        var son1 = new FatherGtw('高衙内');
        console.log(son1.name, son1.car, son1.house);
        // constructor 亲子鉴定的结果 高衙内竟然不是从FatherGtw过来的
        // 手动纠正之后 高太尉和高衙内终于可以认亲了
        console.log(son1.constructor);
    </script>
</body>
</html>